const system = {
    showSplash: true,
    start_img: '',
    adcode: 0,
    city: '',
    city_id: 0,
    popular_city: [],
    city_list: [],
    msgNav: null,
};

const UPDATE = 'update_system';

export default (state = system, action) => {
    switch (action.type) {
        case UPDATE:
            return {...state, ...action.payload};
        default:
            return state;
    }
};

export const saveSystem = (payload) => {
    return {
        type: UPDATE,
        payload,
    };
};
